package com.asr.model;

import lombok.Data;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;

@Data
public class AsrConfig {
    
    // 模型配置
    @NotBlank(message = "说话人分割模型路径不能为空")
    private String speakerSegmentationModel;
    
    @NotBlank(message = "说话人嵌入模型路径不能为空")
    private String speakerEmbeddingModel;
    
    @NotBlank(message = "ASR 模型路径不能为空")
    private String asrModelPath;
    
    @NotBlank(message = "ASR tokens 路径不能为空")
    private String asrTokensPath;
    
    @NotBlank(message = "ASR 模型类型不能为空")
    private String asrModelType; // whisper, paraformer, telespeech, sense-voice
    
    // Whisper 特定配置
    private String whisperEncoder;
    private String whisperDecoder;
    
    // 说话人配置
    private Integer numSpeakers = -1; // -1 表示自动检测
    private Double clusterThreshold = 0.7;
    
    // 语言配置
    private String language = "auto"; // auto, zh, yue
    
    // 处理配置
    @Min(value = 1, message = "进程数至少为 1")
    private Integer numProcesses = 1;
    
    @Min(value = 1, message = "GPU 数至少为 1")
    private Integer numGpus = 1;
    
    // ASR 参数
    private Integer numThreads = 2;
    private Integer sampleRate = 16000;
    private String decodingMethod = "greedy_search";
    private Boolean useItn = true;
    private String provider = "cuda"; // cuda 或 cpu
}
